import maya.OpenMaya as m1

def filterCameraByDependency():
    iter = m1.MItDependencyNodes(m1.MFn.kCamera)
    while not iter.isDone():
        obj = iter.item() #MObject
        #print type(obj)
        print obj.apiTypeStr()
        fn = m1.MFnDependencyNode(obj)
        print fn.name()
        
        iter.next()
    
def filterCameraByDAG(vcam):
    iter = m1.MItDag(m1.MItDag.kBreadthFirst, m1.MFn.kCamera)
    while not iter.isDone():
        obj = iter.item()
        fn = m1.MFnDagNode(obj)
        #print fn.name()
        #print fn.parentCount()
        for i in range(fn.parentCount()):
            p = m1.MFnTransform(fn.parent(i))
            if p and (p.name() == vcam):
                return p
        
        iter.next()
    else:
        return None
                
vcam = filterCameraByDAG('vcam')
print vcam.name()